package com.ciwong.mobilelib.i;

import android.view.View;
import android.widget.AdapterView;
import android.widget.ExpandableListView;


public abstract class OnChildClickListener extends VertifyDurationListener implements ExpandableListView.OnChildClickListener {
    /**
     * 构造方法
     */
    public OnChildClickListener() {

    }

    /**
     * 构造方法
     *
     * @param duration 防止重点间隔时间
     */
    public OnChildClickListener(long duration) {
        this.duration = duration;
    }
    /**
     * 防止重复点击时调用
     */
    public abstract boolean avertRepeatOnClick(ExpandableListView parent, View v, int groupPosition, int childPosition, long id);

    @Override
    public boolean onChildClick(ExpandableListView parent, View v, int groupPosition, int childPosition, long id) {
        if (VertifyDuration()) {
            avertRepeatOnClick(parent, v, groupPosition, childPosition,id);
        }
        return false;
    }
}
